<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>业务功能首页</title>
<link rel="stylesheet" href="<%=path%>/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=path%>/css/easyui.css" />
<link rel="stylesheet" href="<%=path%>/css/icon.css" />
<script src="<%=path%>/js/jsPdf.debug.js"></script>
<script src="<%=path%>/js/html2canvas.js"></script>
<script src="<%=path%>/js/jquery1.12.4.min.js"></script>
<script src="<%=path%>/js/bootstrap.min.js"></script>
<script src="<%=path%>/js/jquery.easyui.min.js"></script>
<style>
body {
	background-color: #f1f1f1;
}

.lightBg {
	background-color: #fff;
	padding: 5px 20px;
}
</style>
<script type="text/javascript">
	function downloadPdf() {
		html2canvas($('#com'), { //tab_customers 为选择要导出的页面id样式
			height : 3000,
			onrendered : function(canvas) {
				var imgData = canvas.toDataURL('img/notice/png');
				var doc = new jsPDF('p', 'px', 'a4');
				//第一列 左右边距  第二列上下边距  第三列是图片左右拉伸  第四列 图片上下拉伸  
				doc.addImage(imgData, 'PNG', 10, 0, 420, 0);
				doc.addPage(); //增加新一页
				doc.addImage(imgData, 'PNG', 10, 0, 420, 0);
				doc.save('Company.pdf');
				// Create a canvas with double-resolution.
				html2canvas(element, {
					scale : 2,
					onrendered : myRenderFunction
				});
				// Create a canvas with 144 dpi (1.5x resolution).
				html2canvas(element, {
					dpi : 144,
					onrendered : myRenderFunction
				});
			}
		});
	}
</script>
</head>
<body>

	<div class="container">
		<div class="row lightBg">
			<!--标题-->
			<h2 class="pull-left">
				<img src="<%=path%>/images/logo.png" style="width: 80px;">
				智游科技项目申报单位信息显示
			</h2>
		</div>
	</div>
	<div class="row" style="margin-top: 20px;text-align: center;"
		align="center" id="com">
		<div style="background-color: #fff;padding: 20px;">
			<table title="单位详情" " style="height: 500px; width: 60%"
				align="center">
				<tr>
					<th style="font-size: 20px " align="center" colspan="4">智游科技项目申报单位信息显示</th>
				</tr>
				<tr>
					<td>单位编号:</td>
					<td><label>${company.CId}</label></td>
					<td>单位名称：</td>
					<td><label>${company.CName}</label></td>
				</tr>
				<tr>
					<td>上级主管单位:</td>
					<td><label>${company.CUpmgr}</label></td>
					<td>单位性质:</td>
					<td><label>${company.CType}</label></td>
				</tr>
				<tr>
					<td>注册资本:</td>
					<td><label>${company.CRegmoney}</label></td>
					<td>注册时间:</td>
					<td><label>${company.CRegtime}</label></td>
				</tr>
				<tr>
					<td>单位地址:</td>
					<td><label>${company.CAddress}</label></td>
					<td>邮政编码:</td>
					<td><label>${company.CPostcode}</label></td>
				</tr>
				<tr>
					<td>单位电话:</td>
					<td><label>${company.CTel}</label></td>
					<td>单位传真:</td>
					<td><label>${company.CFax}</label></td>
				</tr>
				<tr>
					<td>单位网址:</td>
					<td><label>${company.CWeb}</label></td>
					<td colspan="2"></td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<button type="button" class="btn btn-primary"
							style="width: 139px; height: 34px; " onclick="downloadPdf()">导出PDF</button>
					</td>
					<td colspan="2" align="center">
						<button type="button" class="btn btn-secondary"
							onclick="javascript:history.back(-1);"
							style="width: 118px; height: 34px; ">返回</button>
					</td>
				</tr>
			</table>
		</div>
	</div>
</body>
</html>